CC = gcc
NAME = mpmodel
CFLAGS = -fopenmp -I/usr/include/GL -Wall -Iinclude
LIBS = -L/usr/X11R6/lib -lGLU -lGL -lXmu -lXt -lX11 -lXi -lm
OBJECTS = main.o render.o model.o
INCLUDE = render.h default.h localtypes.h model.h

all: $(NAME)

$(NAME): info $(OBJECTS)
	
	$(CC) $(CFLAGS) -o $(NAME) $(OBJECTS) $(LIBS)

	@echo '[01;34m-- build finished --[0m'

%.o: %.c
	$(CC) $(CFLAGS) -c $?

clean: 
	@rm *.o
	@rm $(NAME)

run: $(NAME)
	./$(NAME) < mpmodelrc

rebuild: clean all

info:
	@echo '[01;34m-- build started --[0m'
